<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<head>
   	<jsp:include page="head.jsp"></jsp:include>
</head>
	<body style="margin:0;padding:0;height:100%;overflow:hidden;background:#F2FBFF">
	<form id="companyForm" >
		<input type="hidden" id="cid" name="id" value=""/>
		<input type="hidden" id="companyid" name="companyid" value=""/>
	</form>
	<div id="mainlayout" class="easyui-layout" fit="true">
		<div region="north" border="false" >
			<div class="toolbar">
				<table cellpadding="0" cellspacing="0" style="width:95%;height:50px;" fit="true">
					<tr>
						<td>
							<shiro:hasPermission name="7:add">
							<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newItem()">新增公司</a>
							</shiro:hasPermission>
							<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editItem()">修改公司</a>
							<shiro:hasPermission name="7:delete">
							<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" onclick="delItem()">删除公司</a>
							</shiro:hasPermission>
						</td>
					</tr>
				</table>
			</div>
		</div>
		
		<div region="west" border="false" style="border-right:1px solid #92B7D0;width:150px;padding:5px;">
			<div id="allTrees">
				<%=request.getAttribute("treeScript")%>
			</div>
		</div>
		<div region="center" border="false">
			<table id="dt-company" class="easyui-datagrid"
					url="<c:url value='/permissions/allCompany.tg'/>"
					singleSelect="true" pagination="true"
					border="false" fit="true">
				<thead>
					<tr>
						<th field="ck" checkbox="true"></th>
						<th field="companyId" hidden="true"></th>
						<th field="parentId" hidden="true"></th>						
						<th field="companyName" width="100">公司名称</th>				
						<th field="parentCompanyName" width="100">上级公司名称</th>				
						<th field="phone" width="100">电话</th>				
						<th field="manager" width="100">负责人</th>				
						<th field="managerPhone" width="100">负责人电话</th>				
						<th field="contactPerson" width="100">联系人</th>				
						<th field="contactPhone" width="100">联系人电话</th>				
						<th field="areaId" formatter="areaFormatter" width="100">公司所在区域</th>				
						<th field="address" width="100">公司地址</th>				
						<th field="latitude" width="100">所在纬度</th>				
						<th field="longitude" width="100">所在经度</th>				
						<th field="companyType" formatter="companyTypeFormatter" width="100">公司类型</th>				
						<th field="companyDescription" width="100">公司主营描述</th>
						<th field="status" width="100" formatter="statusFormatter">状态</th>
						<!-- 				
						<th field="companyImagePaht" width="100">公司形象图片</th>
						 -->	
					</tr>
				</thead>
			</table>
		</div>
	</div>

				<!-- ==== -->
				
				
	<div id="dlg" class="easyui-dialog" style="width:430px;height:350px;"
						closed="true" modal="true" buttons="#dlg-buttons">
		<div style="padding-left:50px;padding-top:20px;">
			<form id="myform" method="post">
				<jsp:include page="form.jsp"></jsp:include>
			</form>
		</div>
		<div id="dlg-buttons" style="text-align:center">
			<a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="saveItem()">保存</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
		</div>
	</div>

			
</body>